import { fromJS } from "immutable";
import { CHANGE_LOGIN, LOGOUT } from "./actionTypes";


const defaultState = fromJS({
    login: false
})
export const LoginReducer = (state=defaultState, actions) => {
    switch(actions.type){
        case CHANGE_LOGIN:
            return state.set('login', actions.data)
        case LOGOUT:
            return state.set('login', actions.value)
        default:
            return state
    }
}